<template>
<!--签到记录-->
	<view class="main_section">

    <view class="title_section">
      <view class="title">签到记录</view>
    </view>

    <view class="section_1">
      <view class="btn_section" v-if="tableList.length == 0">
        暂无更多...
      </view>

      <view class="ul" v-else>
        <view class="li" v-for="(v,k) in tableList" :key="k">
          <view class="box">
            <view class="title">签到时间</view>
            <view>{{v.sign_in_time || '暂未签到(请扫码签到)'}}</view>
          </view>
          <view class="box">
            <view class="title">会议名称</view>
            <view>{{v.MeetingHasOne.title || '-'}}</view>
          </view>
        </view>

<!--        <view class="li">-->
<!--          <view class="box">-->
<!--            <view class="title">签到时间</view>-->
<!--            <view>2025-07-11 08:31</view>-->
<!--          </view>-->
<!--          <view class="box">-->
<!--            <view class="title">会议名称</view>-->
<!--            <view>xx会议1</view>-->
<!--          </view>-->
<!--        </view>-->
<!--        <view class="li">-->
<!--          <view class="box">-->
<!--            <view class="title">签到时间</view>-->
<!--            <view>2025-07-11 08:31</view>-->
<!--          </view>-->
<!--          <view class="box">-->
<!--            <view class="title">会议名称</view>-->
<!--            <view>xx会议1</view>-->
<!--          </view>-->
<!--        </view>-->

      </view>
    </view>

  </view>
</template>

<script>
import apiRoute from '@/api/apiRoute.js';

	export default {
		data() {
			return {
        meetingSubjectId:'',//会议主题id

        tableList:[],//表格数据
      }
		},
		onLoad(options) {
      if (options.meetingSubjectId) {
        this.meetingSubjectId = options.meetingSubjectId
      }
    },
    onShow(){
      this.init()
    },
		methods: {
		  async init(){
        await this.getSignInList()
      },

      //获取会议签到列表
      async getSignInList(){
        let params = {
          meeting_subject_id:this.meetingSubjectId
        }
        let res = await apiRoute.getSignInList(params)
        if (res.code != 1) {
          uni.showToast({
            title: res.msg,
            icon: 'none'
          })
          return
        }

        this.tableList = res.data
        console.log(123123,this.tableList)
      },


		}
	}
</script>

<style lang="less" scoped>
.main_section{
  padding: 20rpx;
  padding-bottom: 40rpx;

  .title_section{
    .title{
      font-size: 40rpx;
      color: #2a82e4;
    }
  }

  .section_1{
    .btn_section{
      margin-top: 30rpx;
      text-align: center;
      font-size: 35rpx;
    }
    .ul{
      margin-top: 30rpx;

      display: flex;
      flex-direction: column;
      gap: 20rpx;
      .li{
        padding: 20rpx;
        border: 1px solid #cccccc;
        border-radius: 10rpx;
        display: flex;
        flex-direction: column;
        font-size: 28rpx;
        gap: 15rpx;
        .box{
          display: flex;
          align-items: center;
          gap: 15rpx;
          .title{
            width: 120rpx;
          }
        }
      }
    }
  }

}
</style>
